{{#show_beta}}

{{! corresponding files: commerce_externalfulfillment.php & commerce_externalfulfillment.json }}

{{#job}}
<div class="pure-u-1">
<header>
    <div class="pure-u-1 pure-u-md-1-2">
		  <a class="returnlink current" href="{{www_path}}/commerce/externalfulfillment"><div class="icon icon-arw-dwn"></div><!--icon--></a><h4 class="secondary-title">{{copy_detail_title}} &quot;{{name}}&quot; </h4>
    </div><!--pure-->

    <div class="pure-u-1 pure-u-md-1-2">
      <ul class="inline-subnav">
        <li><a href="/admin/commerce/externalfulfillment/send/{{id}}" class="lightboxed"><span class="icon icon-airplane"></span>{{copy_process_job}}</a></li>
      </ul>
    </div><!--pure-->
</header>
</div><!--pure-->

  <div id="stats">
    <div class="pure-u-1 pure-u-md-1-3"><p class="total">{{copy_backer_count}}<span>{{order_count}}</span></p></div><!--pure-->
    <div class="pure-u-1 pure-u-md-1-3"><p class="inactive">{{copy_completed_orders}}<span>{{completed_orders}}</span></p></div><!--pure-->
    <div class="pure-u-1 pure-u-md-1-3"><p class="newm">{{copy_incomplete_orders}}<span>{{imcomplete_orders}}</span></p></div><!--pure-->
  </div><!--stats-->


<form accept-charset="UTF-8" enctype="multipart/form-data" method="post" action="{{www_path}}/commerce/externalfulfillment/detail/{{id}}" id="rename_tiers" class="nodefaultajax">
            <input type="hidden" name="action" value="do_change" />
            <input type="hidden" name="fulfillment_job_id" value="{{id}}">
            
            <label for="fulfillment_job_name">{{label_job_title}}</label>
            <input type="text" id="asset_title" name="fulfillment_job_name" value="{{name}}" placeholder="Job Name" class="required" />
            <label for="fulfillment_job_description">{{label_job_description}}</label>
            <textarea id="fulfillment_job_description" name="fulfillment_job_description">{{description}}</textarea>
            
            <label for="item_fulfillment_asset">{{label_fulfillment_asset}}</label>
            <select id="item_fulfillment_asset" name="item_fulfillment_asset">
                {{{asset_options}}}
            </select>
            
            <label>{{copy_rename_tiers}}</label>
            <div class="drawer material  pure-u-1 defaultopen">
            		<h5 class="drawerhandle title"><span>{{copy_tier_settings}} ({{tiers_count}})</span></h5>
            		<div class="drawercontent">
                      {{#tiers}}<div class="pure-u-1">
                              <div class="pure-u-1 pure-u-md-1-2">
                                  <label>{{label_tier_name}} <strong>({{orders}} {{label_order_amount}})</strong></label>
                                  <input type="text" name="tier_name[{{id}}]" data-id="{{id}}" value="{{name}}" />
                              </div>
                              <div class="pure-u-1 pure-u-md-1-4">
                                  <label>{{label_upc}}</label>
                                  <input type="text" name="tier_upc[{{id}}]" value="{{upc}}" placeholder="UPC">
                              </div>
                              <div class="pure-u-1 pure-u-md-1-4">
                                  <label>{{label_options}}</label>
                                  <p><label class="checklabel" for="tier_physical[{{id}}]"><input type="checkbox" class="checkorradio" name="tier_physical[{{id}}]" {{#physical}}checked{{/physical}} value="1">{{copy_physical}}</label></p>  
                                  <p><label class="checklabel" for="tier_shipped[{{id}}]"><input type="checkbox" class="checkorradio" name="tier_shipped[{{id}}]" {{#shipped}}checked{{/shipped}} value="1">{{copy_shipped}}</label></p>
                              </div>
                          </div>{{/tiers}}
													
											{{^tiers}}
													<div class="empty align-center">{{copy_no_tiers}}</div>
											{{/tiers}}
            	</div><!--drawercontent-->
            </div><!--drawer-->

            <div class="pure-u-1">
            <button type="submit">{{copy_save}}</button><a class="button needsconfirmation" href="{{www_path}}/commerce/externalfulfillment/delete/{{id}}" type="submit">{{copy_delete}}</a>
            </div><!--pure-->
        </form>
{{/job}}

{{/show_beta}}
